package com.roin.learn.activiti.controller;

import com.roin.learn.activiti.base.BaseController;
import com.roin.learn.activiti.base.SysConstent;
import com.roin.learn.activiti.entity.User;
import com.roin.learn.activiti.exception.BusinessException;
import com.roin.learn.activiti.service.ProcessService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

@Controller
public class IndexController extends BaseController{

    @RequestMapping({"/index","/"})
    public String toIndex(HttpSession session) {
        try {
           User  user = checkLogin(session);
        }catch (BusinessException e){
            return "login";
        }
        return "index";
    }
}
